package crp.core.shared;

import com.qwlabs.exceptions.BadRequestException;
import com.qwlabs.exceptions.CodeException;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageBundle;

import javax.inject.Inject;

import static org.jboss.logging.Messages.getBundle;

@MessageBundle(projectCode = "CRP-SHARD")
public interface SharedMessages {
    @Inject
    SharedMessages INSTANCE = getBundle(SharedMessages.class);

    @Message(value = "实例找不到", format = Message.Format.MESSAGE_FORMAT)
    CodeException instanceNotFound();

    @Message(value = "{0} 找不到, id={1}", format = Message.Format.MESSAGE_FORMAT)
    BadRequestException entityNotFound(String entity, String id);
}
